#!/usr/bin/env python
import os, sys
import screens
import config
from Engine import graphics, engine
import screensdata

def start():
    """Main stuff, Runs Engine.graphics then loads screens data.
    Then runs Engine.engine."""
    version = config.getVersion()
    author=config.getAuthor()
    name = config.getName()
    if (version.endswith('alpha')==True) or (version.endswith('beta')==True):
        print "you are running an unstable release"
        print name
        print " version: "+version
        print " author: "+author    
    screenwidth = config.getWidth()
    screenheight = config.getHeight()

    screen = graphics.initgraphics(version, screenheight, screenwidth)

    #start variables for textScreen
    screens = screensdata.screensdata(screen)
    
    scene = screens.firstscene
    
    engine.engine(scene)

if __name__ == '__main__':
    start()